//
//  ListView.m
//  LStyle
//
//  Created by Obaid Abdul Maroof on 12/20/09.
//  Copyright 2009 Vrije University. All rights reserved.
//

#import "ListView.h"


@implementation ListView

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


#pragma mark UITableView Delegate mehods

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
	return 26;
}

/*- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
	return 145;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
 Album *a = [[Album alloc] initWithNibName:@"Album" bundle:[NSBundle mainBundle]];
 [self.navigationController pushViewController:a animated:YES];
 [a release];
 }*/

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
	int row = indexPath.row;
	UITableViewCell *cell = [tvList dequeueReusableCellWithIdentifier:@"cell"];
	if (cell == nil)
	{
		cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"cell"];		
	}		
	
	[cell setText:@"London"];
	return cell;
}

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {

	NSMutableArray *tempArray = [[NSMutableArray alloc] init];
	[tempArray addObject:@"a"];
	[tempArray addObject:@"b"];
	[tempArray addObject:@"c"];
	[tempArray addObject:@"d"];
	[tempArray addObject:@"e"];
	[tempArray addObject:@"f"];
	[tempArray addObject:@"g"];
	[tempArray addObject:@"h"];
	[tempArray addObject:@"i"];
	[tempArray addObject:@"k"];
	[tempArray addObject:@"l"];
	[tempArray addObject:@"m"];
	[tempArray addObject:@"n"];
	[tempArray addObject:@"o"];
	[tempArray addObject:@"p"];
	[tempArray addObject:@"q"];
	[tempArray addObject:@"r"];
	[tempArray addObject:@"s"];
	[tempArray addObject:@"t"];
	[tempArray addObject:@"u"];
	[tempArray addObject:@"v"];
	[tempArray addObject:@"w"];
	[tempArray addObject:@"x"];
	[tempArray addObject:@"y"];
	[tempArray addObject:@"z"];

	return tempArray;
}

@end
